﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace GSPatEditor.Pat.Effect.Filters
{
    class KeyFrameOnly : FilterBase
    {
        public int KeyIndex { get; set; }

        public void Init(NormalAction parent)
        {
        }

        public void Generate(StringBuilder sb)
        {
            throw new NotImplementedException();
        }

        public bool Simulate(Simulator.Actor actor)
        {
            return actor.CurrentKeyFrameIndex == KeyIndex;
        }
    }

    class CountAfter : FilterBase
    {
        public int Count { get; set; }

        public void Init(NormalAction parent)
        {
        }

        public void Generate(StringBuilder sb)
        {
            throw new NotImplementedException();
        }

        public bool Simulate(Simulator.Actor actor)
        {
            return actor.ActionCount >= Count;
        }
    }

    class ActionKeyReleased : FilterBase
    {
        public int KeyIndex { get; set; } //0:b0,1:b1,2:b2,3:b3

        public void Init(NormalAction parent)
        {
        }

        public void Generate(StringBuilder sb)
        {
            throw new NotImplementedException();
        }

        public bool Simulate(Simulator.Actor actor)
        {
            return false; //not supported
        }
    }

    class CountModZero : FilterBase
    {
        public int Base { get; set; }

        public void Init(NormalAction parent)
        {
        }

        public void Generate(StringBuilder sb)
        {
            throw new NotImplementedException();
        }

        public bool Simulate(Simulator.Actor actor)
        {
            return actor.ActionCount % Base == 0;
        }
    }

}
